/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package integration.BuscaPe;

import org.codehaus.jackson.JsonNode;

/**
 *
 * @author Abraao
 */
public class ProductEntityJson {

    
    int _totalsellers;
    double _pricemax;
    double _pricemin;
    long _id;
    long _categoryid;
    String _thumbnail;
    String _productname;

    public ProductEntityJson(JsonNode object) {
        _productname = object.findValue("productname").asText();
        _pricemax = object.findValue("pricemax").asDouble();
        _pricemin = object.findValue("pricemin").asDouble();
        _id = object.findValue("id").asLong();
        _categoryid = object.findValue("categoryid").asLong();
        _thumbnail = object.findValue("thumbnail").findValue("url").asText();
        _totalsellers = object.findValue("totalsellers").asInt();
    }

    public int getTotalsellers() {
        return _totalsellers;
    }

    public void setTotalsellers(int totalsellers) {
        this._totalsellers = totalsellers;
    }

    public double getPricemax() {
        return _pricemax;
    }

    public void setPricemax(double pricemax) {
        this._pricemax = pricemax;
    }

    public double getPricemin() {
        return _pricemin;
    }

    public void setPricemin(double pricemin) {
        this._pricemin = pricemin;
    }

    public long getId() {
        return _id;
    }

    public void setId(long id) {
        this._id = id;
    }

    public long getCategoriaid() {
        return _categoryid;
    }

    public void setCategoriaid(long categoriaid) {
        this._categoryid = categoriaid;
    }

    public String getThumbnail() {
        return _thumbnail;
    }

    public void setThumbnail(String thumbnail) {
        this._thumbnail = thumbnail;
    }

    public String getProductname() {
        return _productname;
    }

    public void setProductname(String productname) {
        this._productname = productname;
    }
    
    @Override
    public String toString() {
        return "ProductEntityJson{" + "_totalsellers=" + _totalsellers + ", _pricemax=" + _pricemax + ", _pricemin=" + _pricemin + ", _id=" + _id + ", _categoryid=" + _categoryid + ", _thumbnail=" + _thumbnail + ", _productname=" + _productname + '}';
    }
}
